package cc.chenwenxi.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain=true)
@Document(collection = "love_zan")
public class Zan implements Serializable {
	private static final long serialVersionUID = -4153673663814924396L;
	@Id
	private String id;
	@Indexed
	private String userid;
	private String face;
	private String nickname;
	private String time;
	@Indexed
	private Date createTime;
	
	
	public Zan(String userid, String face, String nickname) {
		super();
		this.userid = userid;
		this.face = face;
		this.nickname = nickname;
		Date date = new Date();
		this.time = (date.getTime() / 1000)+"";
		this.createTime = date;
	}


	public Zan() {
		super();
	}
}